using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICSaleQCBillMap : EntityTypeConfiguration<ICSaleQCBill>
    {
        public ICSaleQCBillMap()
        {
            // Primary Key
            this.HasKey(t => t.FInterID);

            // Properties
            this.Property(t => t.FBrNo)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .HasMaxLength(30);

            this.Property(t => t.FBatchNo)
                .IsRequired()
                .HasMaxLength(200);

            this.Property(t => t.FNote)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("ICSaleQCBill");
            this.Property(t => t.FBrNo).HasColumnName("FBrNo");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FTranType).HasColumnName("FTranType");
            this.Property(t => t.FType).HasColumnName("FType");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FFManagerID).HasColumnName("FFManagerID");
            this.Property(t => t.FSManagerID).HasColumnName("FSManagerID");
            this.Property(t => t.FCheckerID).HasColumnName("FCheckerID");
            this.Property(t => t.FCheckDate).HasColumnName("FCheckDate");
            this.Property(t => t.FSCBillInterID).HasColumnName("FSCBillInterID");
            this.Property(t => t.FSerialID).HasColumnName("FSerialID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FUnitID).HasColumnName("FUnitID");
            this.Property(t => t.FResult).HasColumnName("FResult");
            this.Property(t => t.FBatchNo).HasColumnName("FBatchNo");
            this.Property(t => t.FCheckMethod).HasColumnName("FCheckMethod");
            this.Property(t => t.FSendUpQty).HasColumnName("FSendUpQty");
            this.Property(t => t.FCheckQty).HasColumnName("FCheckQty");
            this.Property(t => t.FPassQty).HasColumnName("FPassQty");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FStatus).HasColumnName("FStatus");
            this.Property(t => t.FSpecialUse).HasColumnName("FSpecialUse");
            this.Property(t => t.FCancellation).HasColumnName("FCancellation");
            this.Property(t => t.FBillerID).HasColumnName("FBillerID");
            this.Property(t => t.FCheckTimes).HasColumnName("FCheckTimes");
            this.Property(t => t.FOrgBillID).HasColumnName("FOrgBillID");
            this.Property(t => t.FSampleQty).HasColumnName("FSampleQty");
            this.Property(t => t.FSampleBadQty).HasColumnName("FSampleBadQty");
            this.Property(t => t.FBadQty).HasColumnName("FBadQty");
            this.Property(t => t.FBillDate).HasColumnName("FBillDate");
            this.Property(t => t.FForOpScrapQty).HasColumnName("FForOpScrapQty");
            this.Property(t => t.FForMatScrapQty).HasColumnName("FForMatScrapQty");
            this.Property(t => t.FInStockInterID).HasColumnName("FInStockInterID");
            this.Property(t => t.FQCItemID).HasColumnName("FQCItemID");
            this.Property(t => t.FRoutingID).HasColumnName("FRoutingID");
            this.Property(t => t.FMultiCheckLevel1).HasColumnName("FMultiCheckLevel1");
            this.Property(t => t.FMultiCheckLevel2).HasColumnName("FMultiCheckLevel2");
            this.Property(t => t.FMultiCheckLevel3).HasColumnName("FMultiCheckLevel3");
            this.Property(t => t.FMultiCheckLevel4).HasColumnName("FMultiCheckLevel4");
            this.Property(t => t.FMultiCheckLevel5).HasColumnName("FMultiCheckLevel5");
            this.Property(t => t.FMultiCheckLevel6).HasColumnName("FMultiCheckLevel6");
            this.Property(t => t.FMultiCheckDate1).HasColumnName("FMultiCheckDate1");
            this.Property(t => t.FMultiCheckDate2).HasColumnName("FMultiCheckDate2");
            this.Property(t => t.FMultiCheckDate3).HasColumnName("FMultiCheckDate3");
            this.Property(t => t.FMultiCheckDate4).HasColumnName("FMultiCheckDate4");
            this.Property(t => t.FMultiCheckDate5).HasColumnName("FMultiCheckDate5");
            this.Property(t => t.FMultiCheckDate6).HasColumnName("FMultiCheckDate6");
            this.Property(t => t.FCurCheckLevel).HasColumnName("FCurCheckLevel");
            this.Property(t => t.FWWICMOInterID).HasColumnName("FWWICMOInterID");
            this.Property(t => t.FSampStdID).HasColumnName("FSampStdID");
            this.Property(t => t.FAcQty).HasColumnName("FAcQty");
            this.Property(t => t.FReQty).HasColumnName("FReQty");
            this.Property(t => t.FAQLID).HasColumnName("FAQLID");
            this.Property(t => t.FNotPassQty).HasColumnName("FNotPassQty");
            this.Property(t => t.FSampleBreakQty).HasColumnName("FSampleBreakQty");
            this.Property(t => t.FChildren).HasColumnName("FChildren");
            this.Property(t => t.FAuxPropID).HasColumnName("FAuxPropID");
            this.Property(t => t.FManageType).HasColumnName("FManageType");
        }
    }
}
